package com.bjpowernode.service.impl;

import com.bjpowernode.dao.ProductDao;
import com.bjpowernode.domain.Product;
import com.bjpowernode.service.ProductService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;

@Service
public class ProductServiceImpl implements ProductService {
    @Resource
    private ProductDao productDao;
    @Override
    public List<Product> ListProduct() {
        return productDao.selectListProduct();
    }

    @Override
    public int addProduct(Product product) {

        return productDao.addProduct(product);
    }

    @Override
    public int deleteProduct(Integer id) {
        return productDao.deleteProduct(id);
    }

    @Override
    public int deleteMoreProducts(Serializable[] ids) {
        return productDao.deleteMoreProduct(ids);
    }

    @Override
    public Product editSelectProduct(Integer id) {
        return productDao.editSelectProduct(id);
    }

    @Override
    public Product selectWithType(Integer id) {
        return productDao.selectWithType(id);
    }


}
